#define STRING_CLASSNAME "SpaceDudes"
#define STRING_WINDOWTITLE "SpaceDudes 0003"
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600
#define WINDOW_STYLE (WS_OVERLAPPEDWINDOW|WS_BORDER)
#define DEFAULT_FPS (64)

#pragma once

#include <Windows.h>

typedef void (* tRenderFrame)(HDC, PAINTSTRUCT *);
typedef unsigned long tpixel;

struct tHandleEntry{
	tHandleEntry *pNextEntry;
	HANDLE hValue;
};

class SEng{

private: HWND hWnd;
private: tHandleEntry TerminalHandleList;
private: tpixel *pFrameBuffer;
public: struct{
			int xres,
				yres;
		};

public: static void* SEng::cgpfnRenderFrame;

public: SEng(HINSTANCE, int, tRenderFrame, int, int);

public: ~SEng();

public: static LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);

public: static void FrameTimer(HWND);

public: static void ForwardMessages(void);

public: void AddTerminalHandle(HANDLE);

public: static void PushBuffer(SEng *, HDC);

public: inline HWND GetHWND(void){ return hWnd; };

public: inline tpixel *GetFrameBuffer(void){ return pFrameBuffer; };

};
